package com.twu.biblioteca.menus;

import com.twu.biblioteca.OutputController;
import com.twu.biblioteca.UserList;

import java.io.IOException;

public class CheckMembershipDetailsMenu implements Menu {
    private final OutputController outputController;
    private final UserList userList;

    public CheckMembershipDetailsMenu(OutputController outputController, UserList userList) {

        this.outputController = outputController;
        this.userList = userList;
    }

    @Override
    public void displayMenu() {

    }

    @Override
    public void runCommand() throws IOException {
        if (userList.isLoginSet()) {
            outputController.drawMessage(userList.getLoggedInUser().toString());
        } else {
            outputController.drawMessage("Please talk to a Librarian. Thank you.");
        }
    }

    @Override
    public void getInput() throws IOException {

    }

    @Override
    public int getNextMenu() {
        return 1;
    }

    @Override
    public boolean mustBeLoggedIn() {
        return false;
    }
}
